import React, { Component } from 'react'
import { HashRouter as Router, Route } from "react-router-dom"
import Index from "./components/index/Index"
import Cart from "./components/cart/Cart"
import Category from "./components/category/Category"
import My from "./components/my/My"
import Tabber from "./components/tabber/Tabber"
import SearchCenter from "./components/searchCenter/searchCenter"
import GoodDetail from "./components/goodDetail/GoodDetail"
import GoodList from "./components/goodList/GoodList"
import Pay from "./components/pay/pay"

export default class RouterConfig extends Component {
  render() {
    return (
      <Router>
        <Route path="/" exact render={(props) => <Tabber><Index {...props}></Index></Tabber>}></Route>
        <Route path="/cart" exact render={(props) => <Tabber><Cart {...props}></Cart></Tabber>}></Route>
        <Route path="/category" exact render={(props) => <Tabber><Category {...props}></Category></Tabber>}></Route>
        <Route path="/my" exact render={(props) => <Tabber><My {...props}></My></Tabber>}></Route>
        <Route path="/searchCenter" exact render={(props) => <SearchCenter {...props}></SearchCenter>}></Route>
        <Route path="/goodDetail/:goods_id" exact render={(props) => <GoodDetail {...props}></GoodDetail>}></Route>
        <Route path="/goodList" exact render={(props) => <GoodList {...props}></GoodList>}></Route>
        <Route path="/pay" exact render={(props) => <Pay {...props}></Pay>}></Route>
      </Router>
    )
  }
}
